#include <stdio.h>
#include "zeppreactor.h"

#define MAX_PORT 100

int main(int argv, char **argc) {
    printf("Hello, from Reactor!\n");
    struct zeppreactor *reactor = (struct zeppreactor *)malloc(sizeof(struct zeppreactor));
    zeppreactor_init(reactor);
    for (int i = 0; i < MAX_PORT; i++) {
        int sockfd = init_socket(DEFAULT_PORT + i);
        zeppreactor_addlistener(reactor, sockfd, accept_cb);
    }
    zeppreactor_run(reactor);
    zeppreactor_destory(reactor);

    getchar();

    return 0;
}
